﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tetris
{
    class Rotate
    {
        public void RotateShape()
        {
                
        }

        public void RotateIPosDef(Shape shI)
        {
            shI.b1.x += -1;     shI.b1.y += 3;
            shI.b2.x +=  0;     shI.b2.y += 2;
            shI.b3.x +=  1;     shI.b3.y += 1;
            shI.b4.x +=  2;     shI.b4.y += 0; 
        }
        public void RotateIPos2(Shape shI)
        {
            shI.b1.x += 1 ; shI.b1.y += -3;
            shI.b2.x += 0 ; shI.b2.y += -2;
            shI.b3.x += -1; shI.b3.y += -1;
            shI.b4.x += -2; shI.b4.y += 0;
        }


        public void RotateJPosDef(Shape shI)
        {
            shI.b1.x += -1; shI.b1.y += -1;
            shI.b2.x +=  0; shI.b2.y +=  0;
            shI.b3.x +=  1; shI.b3.y +=  1;
            shI.b4.x +=  0; shI.b4.y +=  2;
        }
        public void RotateJPos2(Shape shI)
        {
            shI.b1.x +=  1; shI.b1.y += -1;
            shI.b2.x +=  0; shI.b2.y +=  0;
            shI.b3.x += -1; shI.b3.y +=  1;
            shI.b4.x += -2; shI.b4.y +=  0;
        }
        public void RotateJPos3(Shape shI)
        {
            shI.b1.x +=  1; shI.b1.y += 2;
            shI.b2.x +=  0; shI.b2.y += 1;
            shI.b3.x += -1; shI.b3.y +=  0;
            shI.b4.x +=  0; shI.b4.y += -1;
        }
        public void RotateJPos4(Shape shI)
        {
            shI.b1.x += -1; shI.b1.y +=  0;
            shI.b2.x +=  0; shI.b2.y += -1;
            shI.b3.x +=  1; shI.b3.y += -2;
            shI.b4.x +=  2; shI.b4.y += -1;
        }


        public void RotateLPosDef(Shape shI)
        {
            shI.b1.x +=  1; shI.b1.y +=  1;
            shI.b2.x +=  0; shI.b2.y +=  0;
            shI.b3.x += -1; shI.b3.y += -1;
            shI.b4.x += -2 ; shI.b4.y +=  0;
        }
        public void RotateLPos2(Shape shI)
        {
            shI.b1.x += -1; shI.b1.y += 1;
            shI.b2.x += 0; shI.b2.y += 0;
            shI.b3.x += 1; shI.b3.y += -1;
            shI.b4.x += 0; shI.b4.y += -2;
        }
        public void RotateLPos3(Shape shI)
        {
            shI.b1.x += -1; shI.b1.y += -1;
            shI.b2.x +=  0; shI.b2.y +=  0;
            shI.b3.x +=  1; shI.b3.y += 1;
            shI.b4.x +=  2; shI.b4.y +=  0;
        }
        public void RotateLPos4(Shape shI)
        {
            shI.b1.x +=  1; shI.b1.y += -1;
            shI.b2.x +=  0; shI.b2.y +=  0;
            shI.b3.x += -1; shI.b3.y +=  1;
            shI.b4.x +=  0; shI.b4.y +=  2;
        }


        public void RotateSPosDef(Shape shI)
        {
            shI.b1.x += 0; shI.b1.y += -2;
            shI.b2.x += 1; shI.b2.y += -1;
            shI.b3.x += 0; shI.b3.y += 0;
            shI.b4.x += 1; shI.b4.y += 1;
        }
        public void RotateSPos2(Shape shI)
        {
            shI.b1.x += 0; shI.b1.y += 2;
            shI.b2.x += -1; shI.b2.y += 1;
            shI.b3.x += 0; shI.b3.y += 0;
            shI.b4.x += -1; shI.b4.y += -1;
        }



        public void RotateZPosDef(Shape shI)
        {
            shI.b1.x += -1; shI.b1.y += -1;
            shI.b2.x += 0; shI.b2.y += 0;
            shI.b3.x += 1; shI.b3.y += -1;
            shI.b4.x += 2; shI.b4.y += 0;
        }
        public void RotateZPos2(Shape shI)
        {
            shI.b1.x += 1; shI.b1.y += 1;
            shI.b2.x += 0; shI.b2.y += 0;
            shI.b3.x += -1; shI.b3.y += 1;
            shI.b4.x += -2; shI.b4.y += 0;
        }



        public void RotateTPosDef(Shape shI)
        {
            shI.b1.x += -1; shI.b1.y += -1;
            shI.b2.x += 0; shI.b2.y += 0;
            shI.b3.x += 1; shI.b3.y += 1;
            shI.b4.x += -1; shI.b4.y += 1;
        }
        public void RotateTPos2(Shape shI)
        {
            shI.b1.x += 1; shI.b1.y += -1;
            shI.b2.x += 0; shI.b2.y += 0;
            shI.b3.x += -1; shI.b3.y += 1;
            shI.b4.x += -1; shI.b4.y += -1;
        }
        public void RotateTPos3(Shape shI)
        {
            shI.b1.x += 1; shI.b1.y += 1;
            shI.b2.x += 0; shI.b2.y += 0;
            shI.b3.x += -1; shI.b3.y += -1;
            shI.b4.x += 1; shI.b4.y += -1;
        }
        public void RotateTPos4(Shape shI)
        {
            shI.b1.x += -1; shI.b1.y += 1;
            shI.b2.x += 0; shI.b2.y += 0;
            shI.b3.x += 1; shI.b3.y += -1;
            shI.b4.x += 1; shI.b4.y += 1;
        }

       
        


    }
}
